// Copyright 2021 Guoyoko. All Rights Reserved.


#include "Graph/CustomizeFlowGraphNode_Root.h"
//#include "Graph/SelfGraph.h"


#define LOCTEXT_NAMESPACE "CustomizeFlowGraphNode"


void UCustomizeFlowGraphNode_Root::AllocateDefaultPins()
{
	UEdGraphPin* Outputs = CreatePin(EGPD_Output, TEXT("Transition"), TEXT(""));
}

FText UCustomizeFlowGraphNode_Root::GetNodeTitle(ENodeTitleType::Type TitleType) const
{
	return FText::FromString(TEXT("Root"));
}

FText UCustomizeFlowGraphNode_Root::GetTooltipText() const
{
	return LOCTEXT("CustomizeFlowNode_Root_Tooltip", "This is a Root node");
}

UEdGraphNode* UCustomizeFlowGraphNode_Root::GetOutputNode() const
{
	if (Pins.Num() > 0 && Pins[0] != NULL)
	{
		check(Pins[0]->LinkedTo.Num() <= 1);
		if (Pins[0]->LinkedTo.Num() > 0 && Pins[0]->LinkedTo[0]->GetOwningNode() != NULL)
		{
			return Pins[0]->LinkedTo[0]->GetOwningNode();
		}
	}
	return NULL;
}

#undef LOCTEXT_NAMESPACE

